#ifndef BINARYSEARCHDIALOG_H
#define BINARYSEARCHDIALOG_H
#include "algorithm/algorithmdialogbase.h"
#include "algorithm/method/binarysearch/binarysearch.h"
#include <QRadioButton>
#include <QButtonGroup>
#include <QGroupBox>

class BinarySearchDialog : public AlgorithmDialogBase
{
    Q_OBJECT
public:
    BinarySearchDialog(QString algorithm, QString algorithmMovie, QSize size = QSize(320, 240));
    ~ BinarySearchDialog();
    virtual void execAlgorithm() override;
    void initLayout();
    void initConnections();
private slots:
    void onRandomOrCustomizeRadioToggle(int index);
    void onTypeComboxGet();
private:
    BinarySearch<float> binSearch;
    QRadioButton *m_pDiGuiBtn;
    QRadioButton *m_pNoDiGuiBtn;
    QButtonGroup *m_pIsDiGuiGroup;
    QGroupBox *m_pGroupBox;

    QRadioButton *m_pRandomRadio;
    QRadioButton *m_pCustomizeRadio;
    QGroupBox *m_pUserGroupBox;

    QButtonGroup *m_pButtonGroup;
    QButtonGroup *m_pButtonGroup1;

    uint8_t m_type = DIGUI;
    enum TYPE{DIGUI, NODIGUI};
    enum DATAFROM{CUSTOMIZE,USER};
};

#endif // BINARYSEARCHDIALOG_H
